﻿using System.Windows;

namespace DynamicGeometry
{
    public abstract class MeasurementBase : LabelBase, IMovable
    {
        public Point Offset { get; set; }

        public override void ReadXml(System.Xml.Linq.XElement element)
        {
            base.ReadXml(element);
            Offset = new Point(element.ReadDouble("OffsetX"), element.ReadDouble("OffsetY"));
        }

        public override void WriteXml(System.Xml.XmlWriter writer)
        {
            base.WriteXml(writer);
            writer.WriteAttributeDouble("OffsetX", Offset.X);
            writer.WriteAttributeDouble("OffsetY", Offset.Y);
        }
    }
}
